package com.neusoft.neuiotms.sap;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.FilterType;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.neusoft.bizcore.activiti.annotation.EnableBizcoreActiviti;
import com.neusoft.bizcore.auth.annotation.EnableBizcoreAuth;
import com.neusoft.bizcore.cache.annotation.EnableBizcoreCache;
import com.neusoft.bizcore.file.annotition.EnableBizcoreFileStorage;
import com.neusoft.bizcore.mom.annotation.EnableBizcoreMom;
import com.neusoft.bizcore.notice.annotition.EnableBizcoreNotice;
import com.neusoft.bizcore.schedule.annotition.EnableBizcoreSchedule;
import com.neusoft.bizcore.webauth.secret.EnableBizcoreSecurity;
import com.neusoft.neuiotms.common.annotition.EnableNeuiotmsCommon;
import com.neusoft.neuiotms.dcam.DcamApplication;
import com.neusoft.neuiotms.dcom.DcomApplication;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@EnableBizcoreSecurity
@EnableBizcoreAuth
@EnableBizcoreSchedule
@EnableBizcoreNotice
@EnableBizcoreMom
@EnableBizcoreActiviti
@EnableScheduling
@EnableBizcoreCache
@EnableNeuiotmsCommon
@EnableBizcoreFileStorage
@SpringBootApplication(exclude = {
        SecurityAutoConfiguration.class,
        org.activiti.spring.boot.SecurityAutoConfiguration.class
})
@EntityScan({"com.neusoft.bizcore.auth.model", "com.neusoft.neuiotms.dcam.common.model",
        "com.neusoft.neuiotms.dcam.fixed.model", "com.neusoft.bizcore.notice.system.model",
        "com.neusoft.bizcore.notice.notification.model", "com.neusoft.neuiotms.dcam.workflow.model",
        "com.neusoft.bizcore.activiti.model", "com.neusoft.neuiotms.dcom.model", "com.neusoft.neuiotms.common.model" })
@EnableJpaRepositories(basePackages = {"com.neusoft.neuiotms.dcam",
        "com.neusoft.bizcore.auth",
        "com.neusoft.bizcore.notice", "com.neusoft.bizcore.activiti", "com.neusoft.neuiotms.dcom",
        "com.neusoft.neuiotms.common" })
@ComponentScan(basePackages = {"com.neusoft.neuiotms.sap", "com.neusoft.neuiotms.dcam",
        "com.neusoft.bizcore.notice", "com.neusoft.neuiotms.dcom" }, excludeFilters = {
                @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DcamApplication.class, DcomApplication.class,
                        org.activiti.spring.boot.JpaProcessEngineAutoConfiguration.class,
                        com.neusoft.neuiotms.dcam.config.ActBusinessService.class }) })

public @interface NeuiotmsSapApplication {

}
